package main

import (
    "fmt"
    "yi-shou-backstage/config"
    "yi-shou-backstage/routers"
)

func main()  {
    // 初始化路由
    router := routers.InitRouter()
    // 启动HTTP服务，默认在0.0.0.0:8080启动服务
    RunAddress := fmt.Sprintf(":%d", config.Conf.Server.Port)
    if err := router.Run(RunAddress); err != nil {
        panic(fmt.Errorf("Start server failed, error: %s \n", err))
    }
}
